<template>
  <div class="weui-panel weui-panel_access">
    <dl>
      <dt>类型：</dt>
      <dd class="fullL">
        <span class="partB">{{rtype}}</span>
        <span class="partS rmoneytext">预计花费</span>
      </dd>
      <dt>状态：</dt>
      <dd class="fullL">
        <span class="partB">{{ostattext}}</span>
        <span class="partS rmoney">{{rmoney}}</span>
      </dd>
      <dt>单号：</dt>
      <dd>{{order_detail.number}}</dd>
      <dt>时间：</dt>
      <dd>{{order_detail.createTime}}</dd>
    </dl>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'OdInfo',
  data () {
    return {
      rtype: '',
      rmoney: '',
      ostat: localStorage.ostat ? localStorage.ostat : '0' // 维修状态
    }
  },
  computed: {
    ...mapState(['order_detail']),
    ostattext () {
      var statInfo = this.cm.getStatInfo(this.ostat)
      return statInfo.text
    }
  },
  mounted () {
    this.rtype = this.cm.getCategoryStr(this.order_detail.labelId)
    this.rmoney = this.order_detail.expectedCost === null ? '***' : this.order_detail.expectedCost
  }
}
</script>

<style lang="stylus" scoped>
.weui-panel
  background #4F77AA
  margin-top 0
  padding .24rem .6rem
  dl
    line-height .52rem
    dt
      float left
      color: rgba(255, 255, 255, 0.43)
      padding-right .2rem
    dd
      color white
      .rmoneytext
        color: rgba(255, 255, 255, 0.43)
      .rmoney
        fontFamily "PingFangSC-Regular"
        font-size .48rem
</style>
